<?php
function smarty_function_callfunc($params, &$smarty) {
    $funcName = $params['funcName'];
    $funcResult = $funcName($params);
    if (isset($params['var'])) {
        $smarty->assign($params['var'], $funcResult);
        return ;
    }
    return $funcResult;
}
?>